package com.ldp.designpatterns.study.adapter.ClassAdapter;

import com.ldp.designpatterns.study.adapter.ClassAdapter.adaptee.ChineseStandard;
import com.ldp.designpatterns.study.adapter.ClassAdapter.adaptee.Volatage220V;
import com.ldp.designpatterns.study.adapter.ClassAdapter.client.Client;
import com.ldp.designpatterns.study.adapter.ClassAdapter.client.Phone;
import com.ldp.designpatterns.study.adapter.ClassAdapter.target.StandardAdapter;
import com.ldp.designpatterns.study.adapter.ClassAdapter.target.VoltageAdapter;

/**
 * @ClassName AdapterTest
 * @Description
 *  适配器一：对象适配器代码——插座适配器,通过类来实现，以类来继承和实现接口的方式，来获取被适配类的信息并转换输出重写到适配接口
 * @Author lindipei
 * @Date 2023/10/16 14:15
 */
public class AdapterTest {
    public static void main(String[] args) {
        new Client().charge(new StandardAdapter(new ChineseStandard()));
        new Phone().charging(new VoltageAdapter(new Volatage220V()));
    }
}
